﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InmobiliariaNegocio;

namespace InmobiliariaIntefaz
{
    public partial class frmListarV : Form
    {
        private Inmobiliaria inmobiliaria;

        public frmListarV(Inmobiliaria inmob)
        {
            InitializeComponent();

            inmobiliaria = inmob;

            CargarGrilla();
        }

        private void CargarGrilla()
        {
            BindingSource source = new BindingSource();
            grvVentas.AutoGenerateColumns = true;
            source.DataSource = inmobiliaria.listarVentas();
            grvVentas.DataSource = source;
        }

        private void tsbConsultar_Click(object sender, EventArgs e)
        {
            CargarGrilla();
        }
    }

}

